package edu.bw.service.impl;

import edu.bw.service.UserService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;


//@Component // 相当于: <bean id="userServiceImpl" class="edu.bw.service.impl.UserServiceImpl"/>
//@Component("userService") // 相当于: <bean id="userService" class="edu.bw.service.impl.UserServiceImpl"/>
@Service
@Data
public class UserServiceImpl implements UserService {

    @Value("13") //将13注入给num
    private int num;

    @Value("abc")//将"abc"注入给str
    private String str;
}
